<html>
<head>
    <title>OS.js Source Code | Sencha Test 1.0.3</title>
    <!--  Generated on  -->
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
    <pre class="editor editor-colors"><div class="line"><a name="line1"><span class="source js"><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></div><div class="line"><a name="line2"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@class</span></span><span>&nbsp;ST.OS</span></span></span></div><div class="line"><a name="line3"><a name="ST.OS"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*&nbsp;Provides&nbsp;information&nbsp;about&nbsp;operating&nbsp;system&nbsp;environment.</span></span></span></div><div class="line"><a name="line4"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*</span></span></span></div><div class="line"><a name="line5"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*&nbsp;Should&nbsp;not&nbsp;be&nbsp;manually&nbsp;instantiated&nbsp;unless&nbsp;for&nbsp;unit-testing.</span></span></span></div><div class="line"><a name="line6"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*&nbsp;Access&nbsp;the&nbsp;global&nbsp;instance&nbsp;stored&nbsp;in&nbsp;{@link&nbsp;ST.os}&nbsp;instead.</span></span></span></div><div class="line"><a name="line7"><span class="source js"><span class="comment block documentation js"><span>&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></div><div class="line"><a name="line8"><span class="source js"><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="constant other property js"><span>OS</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>define</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="meta function js"><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="constant other js"><span>OS</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line9"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line10"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;statics</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line11"><a name="ST.OS-method-parsePrefixes"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line12"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Normalizes&nbsp;the&nbsp;osPrefixes&nbsp;object&nbsp;to&nbsp;get&nbsp;each&nbsp;value</span></span></span></span></span></div><div class="line"><a name="line13"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;an&nbsp;object&nbsp;with&nbsp;an&nbsp;array&nbsp;of&nbsp;RegExps&nbsp;and&nbsp;the&nbsp;name&nbsp;set.</span></span></span></span></span></div><div class="line"><a name="line14"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;makes&nbsp;the&nbsp;{@link&nbsp;checkUserAgent}&nbsp;method&nbsp;simpler.</span></span></span></span></span></div><div class="line"><a name="line15"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line16"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>parsePrefixes</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line17"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;proto&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>prototype</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line18"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefixes&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>proto</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>osPrefixes</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line19"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;names&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>proto</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>osNames</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line20"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;prefix</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;type</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;name</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;i</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;length</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;re</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line21"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line22"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>code&nbsp;</span><span class="keyword operator in js"><span>in</span></span><span>&nbsp;prefixes</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line23"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefix&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;prefixes</span><span class="meta brace square js"><span>[</span></span><span>code</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line24"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;prefix</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line25"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;names</span><span class="meta brace square js"><span>[</span></span><span>code</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line26"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line27"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>type&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>string</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line28"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefix&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;prefixes</span><span class="meta brace square js"><span>[</span></span><span>code</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line29"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>need&nbsp;to&nbsp;parse&nbsp;a&nbsp;string&nbsp;into&nbsp;a&nbsp;RegExp</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line30"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace square js"><span>[</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>RegExp</span></span></span><span class="meta brace round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>(?:</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;prefix&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>)([^</span><span class="constant character escape js"><span>\\</span></span><span>s;)]+)</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace square js"><span>]</span></span></span></span></span></div><div class="line"><a name="line31"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line32"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>type&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>object</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line33"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>string</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line34"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>need&nbsp;to&nbsp;parse&nbsp;a&nbsp;string&nbsp;into&nbsp;a&nbsp;RegExp</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line35"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace square js"><span>[</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>RegExp</span></span></span><span class="meta brace round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>(?:</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span>&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>)([^</span><span class="constant character escape js"><span>\\</span></span><span>s;)]+)</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line36"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>re</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line37"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;isn&#39;t&nbsp;an&nbsp;array</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line38"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace square js"><span>[</span></span></span></span></span></div><div class="line"><a name="line39"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line40"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line41"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line42"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;length&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>re</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line43"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line44"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i&nbsp;</span><span class="keyword operator comparison js"><span>&lt;</span></span><span>&nbsp;length</span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i</span><span class="keyword operator increment js"><span>++</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line45"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line46"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line47"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;re&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>string</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line48"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>need&nbsp;to&nbsp;parse&nbsp;a&nbsp;string&nbsp;into&nbsp;a&nbsp;RegExp</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line49"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>RegExp</span></span></span><span class="meta brace round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>(?:</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;re&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>)([^</span><span class="constant character escape js"><span>\\</span></span><span>s;)]+)</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line50"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line51"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line52"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line53"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line54"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line55"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>name&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>name</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line56"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>name</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;name</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line57"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line58"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line59"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line60"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line61"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line62"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>constructor</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>userAgent</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>platform</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>browserScope</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line63"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line64"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;names&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>osNames</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line65"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>is</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line66"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;version</span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line67"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;item</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line68"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line69"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;browserScope&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;browserScope&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>browser</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line70"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line71"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>checkUserAgent</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>userAgent</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line72"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line73"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>name</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line74"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>version</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line75"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line76"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>name</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line77"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line78"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>version</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line79"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>name&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>version</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getMajor</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line80"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>name&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;</span><span class="variable other object js"><span>version</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getShortVersion</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line81"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line82"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line83"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>platform</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line84"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="variable other object js"><span>platform</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>replace</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string regexp js"><span class="punctuation definition string begin js"><span>/</span></span><span>&nbsp;simulator</span><span class="keyword control anchor regexp"><span>$</span></span><span class="punctuation definition string end js"><span>/</span></span><span>i</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line85"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line86"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line87"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>i&nbsp;</span><span class="keyword operator in js"><span>in</span></span><span>&nbsp;names</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line88"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>names</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>hasOwnProperty</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>i</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line89"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;names</span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line90"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line91"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>is</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>hasOwnProperty</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>name</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line92"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>item</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>name&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;item</span><span class="meta brace round js"><span>)</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line93"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line94"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line95"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line96"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line97"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;Detect&nbsp;if&nbsp;the&nbsp;device&nbsp;is&nbsp;the&nbsp;iPhone&nbsp;5.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line98"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>name&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>iOS</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="support class js"><span>window</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>screen</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>height</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>568</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line99"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>iPhone5</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line100"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line101"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line102"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>browserScope</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Safari</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>browserScope</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Silk</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line103"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;ST.browser.version.shortVersion&nbsp;==&nbsp;501&nbsp;is&nbsp;for&nbsp;debugging&nbsp;off&nbsp;device</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line104"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Android2</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Android3</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>browserScope</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>version</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>shortVersion</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>501</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line105"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>browserScope</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>AndroidStock</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line106"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line107"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Android4</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line108"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>browserScope</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>AndroidStock</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line109"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>browserScope</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>AndroidStock4</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line110"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line111"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line112"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line113"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line114"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>checkUserAgent</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>userAgent</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>prefix</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line115"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line116"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefixes&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>osPrefixes</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line117"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;names&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>osNames</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line118"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;prefix</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;name</span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line119"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;regExps</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;i</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;length</span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line120"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;match</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;match1</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;version</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line121"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line122"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>code&nbsp;</span><span class="keyword operator in js"><span>in</span></span><span>&nbsp;prefixes</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line123"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefix&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;prefixes</span><span class="meta brace square js"><span>[</span></span><span>code</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line124"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;regExps&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>re</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line125"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line126"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;length&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>regExps</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line127"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line128"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i&nbsp;</span><span class="keyword operator comparison js"><span>&lt;</span></span><span>&nbsp;length</span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i</span><span class="keyword operator increment js"><span>++</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line129"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;regExps</span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line130"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;match&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>userAgent</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>match</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>re</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line131"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line132"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>match</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line133"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>name</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;names</span><span class="meta brace square js"><span>[</span></span><span>code</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line134"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;match1&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;match</span><span class="meta brace square js"><span>[</span></span><span class="constant numeric decimal js"><span>1</span></span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line135"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line136"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>match1</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line137"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;This&nbsp;is&nbsp;here&nbsp;because&nbsp;some&nbsp;HTC&nbsp;android&nbsp;devices&nbsp;show&nbsp;an&nbsp;OSX&nbsp;Snow&nbsp;Leopard&nbsp;userAgent&nbsp;by&nbsp;default.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line138"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;And&nbsp;the&nbsp;Kindle&nbsp;Fire&nbsp;doesn&#39;t&nbsp;have&nbsp;any&nbsp;indicator&nbsp;of&nbsp;Android&nbsp;as&nbsp;the&nbsp;OS&nbsp;in&nbsp;its&nbsp;User&nbsp;Agent</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line139"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>match1&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>HTC_</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;match1&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Silk/</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line140"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>ST.Version</span></span></span><span class="meta brace round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>2.3</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line141"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line142"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>ST.Version</span></span></span><span class="meta brace round js"><span>(</span></span><span>match</span><span class="meta brace square js"><span>[</span></span><span class="variable other object js"><span>match</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span>&nbsp;</span><span class="keyword operator js"><span>-</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta brace square js"><span>]</span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line143"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line144"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>version</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line145"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>allow&nbsp;a&nbsp;version&nbsp;to&nbsp;be&nbsp;coded&nbsp;when&nbsp;not&nbsp;found&nbsp;in&nbsp;the&nbsp;userAgent</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line146"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>ST.Version</span></span></span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>prefix</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>version</span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line147"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line148"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line149"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>break</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line150"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line151"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line152"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line153"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>match</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line154"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>break</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line155"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line156"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line157"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line158"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span>name</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line159"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;names</span><span class="meta brace square js"><span>[</span></span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>userAgent</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>toLowerCase</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>match</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string regexp js"><span class="punctuation definition string begin js"><span>/</span></span><span>mac</span><span class="keyword operator or regexp"><span>|</span></span><span>win</span><span class="keyword operator or regexp"><span>|</span></span><span>linux</span><span class="punctuation definition string end js"><span>/</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="meta brace square js"><span>[</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>other</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace square js"><span>]</span></span><span class="meta brace round js"><span>)</span></span><span class="meta brace square js"><span>[</span></span><span class="constant numeric decimal js"><span>0</span></span><span class="meta brace square js"><span>]</span><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line160"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line161"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line162"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span>version</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line163"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>ST.Version</span></span></span><span class="meta brace round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line164"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line165"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line166"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>name</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;name</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line167"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>version</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;version</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line168"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line169"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line170"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;name</span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line171"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;version</span></span></span></span></div><div class="line"><a name="line172"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line173"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line174"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line175"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;osNames</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line176"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;android</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Android</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line177"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bada</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Bada</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line178"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blackberry</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>BlackBerry</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line179"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chromeOS</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>ChromeOS</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line180"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ios</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>iOS</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line181"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;linux</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Linux</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line182"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mac</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>MacOS</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line183"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;other</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Other</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line184"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rimTablet</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>RIMTablet</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line185"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Tizen</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line186"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;webos</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>webOS</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line187"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;winXp</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows&nbsp;XP</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line188"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;winVista</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows&nbsp;Vista</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line189"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win7</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows&nbsp;7</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line190"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win8</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows&nbsp;8.0</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line191"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win81</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows&nbsp;8.1</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line192"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line193"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;windowsPhone</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>WindowsPhone</span><span class="punctuation definition string end js"><span>&#39;</span></span></span></span></span></span></div><div class="line"><a name="line194"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line195"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line196"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;osPrefixes</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line197"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;android</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>(Android&nbsp;|HTC_|Silk/)</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line198"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bada</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Bada/</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line199"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blackberry</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>(?:BlackBerry|BB)(?:.*)Version/</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line200"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chromeOS</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>CrOS&nbsp;</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line201"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ios</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>i(?:Pad|Phone|Pod)(?:.*)CPU(?:&nbsp;iPhone)?&nbsp;OS&nbsp;</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line202"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;linux</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Linux&nbsp;(?:x86_64|i686);&nbsp;rv:</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line203"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mac</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Mac&nbsp;OS&nbsp;X&nbsp;</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line204"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rimTablet</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>RIM&nbsp;Tablet&nbsp;OS&nbsp;</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line205"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>(Tizen&nbsp;)</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line206"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;webos</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>(?:webOS|hpwOS)/</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line207"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;winXp</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line208"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re</span><span class="keyword operator js"><span>:</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span>Windows&nbsp;</span><span class="meta group regexp"><span class="punctuation definition group regexp"><span>(?:</span></span><span>NT</span><span class="constant character character-class regexp"><span>\s</span></span><span class="punctuation definition group regexp"><span>)</span></span></span><span class="keyword operator quantifier regexp"><span>?</span></span><span>5</span><span class="constant character escape backslash regexp"><span>\.</span></span><span>1</span><span class="punctuation definition string end js"><span>/</span></span></span></span></span></span></div><div class="line"><a name="line209"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line210"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;winVista</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line211"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re</span><span class="keyword operator js"><span>:</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span>Windows&nbsp;</span><span class="meta group regexp"><span class="punctuation definition group regexp"><span>(?:</span></span><span>NT</span><span class="constant character character-class regexp"><span>\s</span></span><span class="punctuation definition group regexp"><span>)</span></span></span><span class="keyword operator quantifier regexp"><span>?</span></span><span>6</span><span class="constant character escape backslash regexp"><span>\.</span></span><span>0</span><span class="punctuation definition string end js"><span>/</span></span></span></span></span></span></div><div class="line"><a name="line212"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line213"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win7</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line214"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re</span><span class="keyword operator js"><span>:</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span>Windows&nbsp;</span><span class="meta group regexp"><span class="punctuation definition group regexp"><span>(?:</span></span><span>NT</span><span class="constant character character-class regexp"><span>\s</span></span><span class="punctuation definition group regexp"><span>)</span></span></span><span class="keyword operator quantifier regexp"><span>?</span></span><span>6</span><span class="constant character escape backslash regexp"><span>\.</span></span><span>1</span><span class="punctuation definition string end js"><span>/</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line215"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>7.0</span><span class="punctuation definition string end js"><span>&#39;</span></span></span></span></span></span></div><div class="line"><a name="line216"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line217"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win8</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line218"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re</span><span class="keyword operator js"><span>:</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span>Windows&nbsp;</span><span class="meta group regexp"><span class="punctuation definition group regexp"><span>(?:</span></span><span>NT</span><span class="constant character character-class regexp"><span>\s</span></span><span class="punctuation definition group regexp"><span>)</span></span></span><span class="keyword operator quantifier regexp"><span>?</span></span><span>6</span><span class="constant character escape backslash regexp"><span>\.</span></span><span>2</span><span class="punctuation definition string end js"><span>/</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line219"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>8.0</span><span class="punctuation definition string end js"><span>&#39;</span></span></span></span></span></span></div><div class="line"><a name="line220"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line221"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win81</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line222"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;re</span><span class="keyword operator js"><span>:</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span>Windows&nbsp;</span><span class="meta group regexp"><span class="punctuation definition group regexp"><span>(?:</span></span><span>NT</span><span class="constant character character-class regexp"><span>\s</span></span><span class="punctuation definition group regexp"><span>)</span></span></span><span class="keyword operator quantifier regexp"><span>?</span></span><span>6</span><span class="constant character escape backslash regexp"><span>\.</span></span><span>3</span><span class="punctuation definition string end js"><span>/</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line223"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>8.1</span><span class="punctuation definition string end js"><span>&#39;</span></span></span></span></span></span></div><div class="line"><a name="line224"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line225"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;win</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows&nbsp;(?:NT</span><span class="constant character escape js"><span>\\</span></span><span>s)?</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line226"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;windowsPhone</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Windows&nbsp;Phone&nbsp;</span><span class="punctuation definition string end js"><span>&#39;</span></span></span></span></span></span></div><div class="line"><a name="line227"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line228"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line229"><a name="ST.os-method-is"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line230"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;A&nbsp;&quot;hybrid&quot;&nbsp;property,&nbsp;can&nbsp;be&nbsp;either&nbsp;accessed&nbsp;as&nbsp;a&nbsp;method&nbsp;call,&nbsp;i.e:</span></span></span></span></span></div><div class="line"><a name="line231"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line232"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ST.os.is(&#39;Android&#39;))&nbsp;{</span></span></span></span></span></div><div class="line"><a name="line233"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;...</span></span></span></span></span></div><div class="line"><a name="line234"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></span></span></span></div><div class="line"><a name="line235"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line236"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;or&nbsp;as&nbsp;an&nbsp;object&nbsp;with&nbsp;boolean&nbsp;properties,&nbsp;i.e:</span></span></span></span></span></div><div class="line"><a name="line237"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line238"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ST.os.is.Android)&nbsp;{</span></span></span></span></span></div><div class="line"><a name="line239"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;...</span></span></span></span></span></div><div class="line"><a name="line240"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></span></span></span></div><div class="line"><a name="line241"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line242"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Versions&nbsp;can&nbsp;be&nbsp;conveniently&nbsp;checked&nbsp;as&nbsp;well.&nbsp;For&nbsp;example:</span></span></span></span></span></div><div class="line"><a name="line243"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line244"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ST.os.is.Android2)&nbsp;{</span></span></span></span></span></div><div class="line"><a name="line245"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Equivalent&nbsp;to&nbsp;(ST.os.is.Android&nbsp;&amp;&amp;&nbsp;ST.os.version.equals(2))</span></span></span></span></span></div><div class="line"><a name="line246"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></span></span></span></div><div class="line"><a name="line247"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line248"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ST.os.is.iOS32)&nbsp;{</span></span></span></span></span></div><div class="line"><a name="line249"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Equivalent&nbsp;to&nbsp;(ST.os.is.iOS&nbsp;&amp;&amp;&nbsp;ST.os.version.equals(3.2))</span></span></span></span></span></div><div class="line"><a name="line250"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></span></span></span></div><div class="line"><a name="line251"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line252"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Note&nbsp;that&nbsp;only&nbsp;{@link&nbsp;ST.Version#getMajor&nbsp;major&nbsp;component}&nbsp;and&nbsp;{@link&nbsp;ST.Version#getShortVersion&nbsp;simplified}</span></span></span></span></span></div><div class="line"><a name="line253"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;value&nbsp;of&nbsp;the&nbsp;version&nbsp;are&nbsp;available&nbsp;via&nbsp;direct&nbsp;property&nbsp;checking.&nbsp;Supported&nbsp;values&nbsp;are:</span></span></span></span></span></div><div class="line"><a name="line254"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line255"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;iOS</span></span></span></span></span></div><div class="line"><a name="line256"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;iPad</span></span></span></span></span></div><div class="line"><a name="line257"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;iPhone</span></span></span></span></span></div><div class="line"><a name="line258"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;iPhone5&nbsp;(also&nbsp;true&nbsp;for&nbsp;4in&nbsp;iPods).</span></span></span></span></span></div><div class="line"><a name="line259"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;iPod</span></span></span></span></span></div><div class="line"><a name="line260"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Android</span></span></span></span></span></div><div class="line"><a name="line261"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;WebOS</span></span></span></span></span></div><div class="line"><a name="line262"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;BlackBerry</span></span></span></span></span></div><div class="line"><a name="line263"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Bada</span></span></span></span></span></div><div class="line"><a name="line264"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;MacOS</span></span></span></span></span></div><div class="line"><a name="line265"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Windows</span></span></span></span></span></div><div class="line"><a name="line266"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Linux</span></span></span></span></span></div><div class="line"><a name="line267"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Other</span></span></span></span></span></div><div class="line"><a name="line268"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@member</span></span><span>&nbsp;ST.os</span></span></span></span></span></div><div class="line"><a name="line269"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>name</span></span><span>&nbsp;</span><span class="other description jsdoc"><span>The&nbsp;OS&nbsp;name&nbsp;to&nbsp;check.</span></span></span></span></span></span></span></div><div class="line"><a name="line270"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{Boolean}</span></span></span></span></span></div><div class="line"><a name="line271"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line272"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>is</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>name</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line273"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span><span>!</span></span><span class="variable language js"><span>this</span></span><span class="meta brace square js"><span>[</span></span><span>name</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line274"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line275"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line276"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line277"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@property</span></span><span>&nbsp;{String}&nbsp;[name=null]</span></span></span></span></span></div><div class="line"><a name="line278"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@readonly</span></span></span></span></span></span></div><div class="line"><a name="line279"><a name="ST.os-property-name"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@member</span></span><span>&nbsp;ST.os</span></span></span></span></span></div><div class="line"><a name="line280"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;full&nbsp;name&nbsp;of&nbsp;the&nbsp;current&nbsp;operating&nbsp;system.&nbsp;Possible&nbsp;values&nbsp;are:</span></span></span></span></span></div><div class="line"><a name="line281"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line282"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;iOS</span></span></span></span></span></div><div class="line"><a name="line283"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Android</span></span></span></span></span></div><div class="line"><a name="line284"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;WebOS</span></span></span></span></span></div><div class="line"><a name="line285"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;BlackBerry,</span></span></span></span></span></div><div class="line"><a name="line286"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;MacOS</span></span></span></span></span></div><div class="line"><a name="line287"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Windows</span></span></span></span></span></div><div class="line"><a name="line288"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Linux</span></span></span></span></span></div><div class="line"><a name="line289"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Other</span></span></span></span></span></div><div class="line"><a name="line290"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line291"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;name</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line292"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line293"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line294"><a name="ST.os-property-version"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@property</span></span><span>&nbsp;{ST.Version}&nbsp;[version=null]</span></span></span></span></span></div><div class="line"><a name="line295"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Refer&nbsp;to&nbsp;{@link&nbsp;ST.Version}</span></span></span></span></span></div><div class="line"><a name="line296"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@member</span></span><span>&nbsp;ST.os</span></span></span></span></span></div><div class="line"><a name="line297"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@readonly</span></span></span></span></span></span></div><div class="line"><a name="line298"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line299"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;version</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line300"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line301"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>setFlag</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>name</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>value</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line302"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>value&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant language js"><span>undefined</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line303"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line304"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line305"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line306"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>flags</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line307"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>flags</span></span><span class="meta brace square js"><span>[</span></span><span>name</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;value</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line308"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line309"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>is</span></span><span class="meta brace square js"><span>[</span></span><span>name</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;value</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line310"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>is</span></span><span class="meta brace square js"><span>[</span></span><span class="variable other object js"><span>name</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>toLowerCase</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;value</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line311"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line312"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line313"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line314"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="meta brace curly js"><span>}</span></span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line315"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="meta function js"><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="constant other js"><span>OS</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line316"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;userAgent&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>navigator</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>userAgent</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line317"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>is</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>is</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="punctuation section scope begin js"><span>{</span></span><span class="punctuation section scope end js"><span>}</span></span><span class="meta brace round js"><span>)</span><span>)</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line318"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;osEnv</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;osName</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;deviceType</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line319"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line320"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>OS</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>parsePrefixes</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line321"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line322"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>OS</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>prototype</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>flags</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;is</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line323"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line324"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line325"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@class</span></span><span>&nbsp;ST.os</span></span></span></span></span></div><div class="line"><a name="line326"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@extends</span></span><span>&nbsp;ST.OS</span></span></span></span></span></div><div class="line"><a name="line327"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@singleton</span></span></span></span></span></div><div class="line"><a name="line328"><a name="ST.os"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Provides&nbsp;useful&nbsp;information&nbsp;about&nbsp;the&nbsp;current&nbsp;operating&nbsp;system&nbsp;environment.</span></span></span></span></span></div><div class="line"><a name="line329"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line330"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Example:</span></span></span></span></span></div><div class="line"><a name="line331"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line332"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ST.os.is.Windows)&nbsp;{</span></span></span></span></span></div><div class="line"><a name="line333"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Windows&nbsp;specific&nbsp;code&nbsp;here</span></span></span></span></span></div><div class="line"><a name="line334"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></span></span></span></div><div class="line"><a name="line335"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line336"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ST.os.is.iOS)&nbsp;{</span></span></span></span></span></div><div class="line"><a name="line337"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;iPad,&nbsp;iPod,&nbsp;iPhone,&nbsp;etc.</span></span></span></span></span></div><div class="line"><a name="line338"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></span></span></span></div><div class="line"><a name="line339"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line340"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&quot;Version&nbsp;&quot;&nbsp;+&nbsp;ST.os.version);</span></span></span></span></span></div><div class="line"><a name="line341"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line342"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;For&nbsp;a&nbsp;full&nbsp;list&nbsp;of&nbsp;supported&nbsp;values,&nbsp;refer&nbsp;to&nbsp;the&nbsp;{@link&nbsp;#is}&nbsp;property/method.</span></span></span></span></span></div><div class="line"><a name="line343"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line344"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line345"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>os</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;osEnv&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>OS</span></span></span><span class="meta brace round js"><span>(</span></span><span>userAgent</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="support class js"><span>navigator</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>platform</span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line346"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line347"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;osName&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>name</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line348"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line349"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;A&nbsp;couple&nbsp;compatible&nbsp;flavors:</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line350"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other js"><span>ST</span></span><span class="meta brace square js"><span>[</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>is</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;osName</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;</span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;e.g.,&nbsp;ST.isWindows</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line351"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>isMac</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Mac</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>MacOS</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line352"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line353"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;search&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>window</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>location</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>search</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>match</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string regexp js"><span class="punctuation definition string begin js"><span>/</span></span><span>deviceType=</span><span class="meta group regexp"><span class="punctuation definition group regexp"><span>(</span></span><span>Tablet</span><span class="keyword operator or regexp"><span>|</span></span><span>Phone</span><span class="punctuation definition group regexp"><span>)</span></span></span><span class="punctuation definition string end js"><span>/</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line354"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nativeDeviceType&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>window</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>deviceType</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line355"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line356"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;Override&nbsp;deviceType&nbsp;by&nbsp;adding&nbsp;a&nbsp;get&nbsp;variable&nbsp;of&nbsp;deviceType.&nbsp;NEEDED&nbsp;FOR&nbsp;DOCS&nbsp;APP.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line357"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;E.g:&nbsp;example/kitchen-sink.html?deviceType=Phone</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line358"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>search&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;search</span><span class="meta brace square js"><span>[</span></span><span class="constant numeric decimal js"><span>1</span></span><span class="meta brace square js"><span>]</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line359"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceType&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;search</span><span class="meta brace square js"><span>[</span></span><span class="constant numeric decimal js"><span>1</span></span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line360"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line361"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>nativeDeviceType&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>iPhone</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line362"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceType&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Phone</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line363"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line364"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>nativeDeviceType&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>iPad</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line365"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceType&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Tablet</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line366"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line367"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line368"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Android</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>iOS</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>WindowsPhone</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span>Windows</span><span class="keyword operator or regexp"><span>|</span></span><span>Linux</span><span class="keyword operator or regexp"><span>|</span></span><span>MacOS</span><span class="punctuation definition string end js"><span>/</span></span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>test</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>osName</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line369"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceType&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Desktop</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line370"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line371"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;always&nbsp;set&nbsp;it&nbsp;to&nbsp;false&nbsp;when&nbsp;you&nbsp;are&nbsp;on&nbsp;a&nbsp;desktop&nbsp;not&nbsp;using&nbsp;Ripple&nbsp;Emulation</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line372"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>browser</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>WebView</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span><span>!</span></span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>browser</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Ripple</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line373"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line374"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>iPad</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>RIMTablet</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Android3</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span></span></span></span></div><div class="line"><a name="line375"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>browser</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Silk</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span></span></span></span></div><div class="line"><a name="line376"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>is</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Android</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>userAgent</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>search</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string regexp js"><span class="punctuation definition string begin js"><span>/</span></span><span>mobile</span><span class="punctuation definition string end js"><span>/</span></span><span>i</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="keyword operator js"><span>-</span></span><span class="constant numeric decimal js"><span>1</span></span><span class="meta brace round js"><span>)</span><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line377"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceType&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Tablet</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line378"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line379"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line380"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deviceType&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>Phone</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line381"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line382"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line383"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line384"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line385"><a name="ST.os-property-deviceType"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@property</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>deviceType</span></span><span>&nbsp;</span></span></span></span></span></span></div><div class="line"><a name="line386"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;generic&nbsp;type&nbsp;of&nbsp;the&nbsp;current&nbsp;device.</span></span></span></span></span></div><div class="line"><a name="line387"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line388"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Possible&nbsp;values:</span></span></span></span></span></div><div class="line"><a name="line389"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line390"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Phone</span></span></span></span></span></div><div class="line"><a name="line391"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Tablet</span></span></span></span></span></div><div class="line"><a name="line392"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;Desktop</span></span></span></span></span></div><div class="line"><a name="line393"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line394"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;For&nbsp;testing&nbsp;purposes&nbsp;the&nbsp;deviceType&nbsp;can&nbsp;be&nbsp;overridden&nbsp;by&nbsp;adding</span></span></span></span></span></div><div class="line"><a name="line395"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;a&nbsp;deviceType&nbsp;parameter&nbsp;to&nbsp;the&nbsp;URL&nbsp;of&nbsp;the&nbsp;page,&nbsp;like&nbsp;so:</span></span></span></span></span></div><div class="line"><a name="line396"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line397"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="markup underline link http hyperlink"><span>http://localhost/mypage.html?deviceType=Tablet</span></span></span></span></span></span></div><div class="line"><a name="line398"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line399"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@member</span></span><span>&nbsp;ST.os</span></span></span></span></span></div><div class="line"><a name="line400"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line401"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>osEnv</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>setFlag</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>deviceType</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line402"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>osEnv</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>deviceType</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;deviceType</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line403"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line404"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword operator delete js"><span>delete</span></span><span>&nbsp;</span><span class="constant other object js"><span>OS</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>prototype</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>flags</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line405"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></div></pre>
</body>
<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-1396058-28', 'auto');
    ga('send', 'pageview');

</script>
</html>
